package com.ruoyi.project.warehouseSystem.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.warehouseSystem.mapper.CWarehouseMapper;
import com.ruoyi.project.warehouseSystem.domain.CWarehouse;
import com.ruoyi.project.warehouseSystem.service.ICWarehouseService;

/**
 * 仓库的增删改查Service业务层处理
 * 
 * @author wangshuo
 * @date 2021-07-18
 */
@Service
public class CWarehouseServiceImpl implements ICWarehouseService 
{
    @Autowired
    private CWarehouseMapper cWarehouseMapper;

    /**
     * 查询仓库的增删改查
     * 
     * @param id 仓库的增删改查ID
     * @return 仓库的增删改查
     */
    @Override
    public CWarehouse selectCWarehouseById(Long id)
    {
        return cWarehouseMapper.selectCWarehouseById(id);
    }

    /**
     * 查询仓库的增删改查列表
     * 
     * @param cWarehouse 仓库的增删改查
     * @return 仓库的增删改查
     */
    @Override
    public List<CWarehouse> selectCWarehouseList(CWarehouse cWarehouse)
    {
        return cWarehouseMapper.selectCWarehouseList(cWarehouse);
    }

    /**
     * 新增仓库的增删改查
     * 
     * @param cWarehouse 仓库的增删改查
     * @return 结果
     */
    @Override
    public int insertCWarehouse(CWarehouse cWarehouse)
    {
        return cWarehouseMapper.insertCWarehouse(cWarehouse);
    }

    /**
     * 修改仓库的增删改查
     * 
     * @param cWarehouse 仓库的增删改查
     * @return 结果
     */
    @Override
    public int updateCWarehouse(CWarehouse cWarehouse)
    {
        return cWarehouseMapper.updateCWarehouse(cWarehouse);
    }

    /**
     * 批量删除仓库的增删改查
     * 
     * @param ids 需要删除的仓库的增删改查ID
     * @return 结果
     */
    @Override
    public int deleteCWarehouseByIds(Long[] ids)
    {
        return cWarehouseMapper.deleteCWarehouseByIds(ids);
    }

    /**
     * 删除仓库的增删改查信息
     * 
     * @param id 仓库的增删改查ID
     * @return 结果
     */
    @Override
    public int deleteCWarehouseById(Long id)
    {
        return cWarehouseMapper.deleteCWarehouseById(id);
    }
}
